<?php

class Log_Writer_File
{
	/**
	 * @var string
	 */
	protected $_file;

	/**
	 * constructor
	 * @return void
	 */
	public function __construct($file)
	{
		$this -> _file = $file;
	}
	
	/**
	 * log any of message to file base.
	 */
	public function write()
	{
		$fp = fopen($this->_file, 'a+');
		if($fp){
			fwrite($fp, implode(PHP_EOL, func_get_args()));
			fclose($fp);
		}
		return $this;
	}

}